package com.example.demo.dao;

import com.example.demo.model.Userinfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    List<Userinfo> getAll();

    Userinfo getById(@Param("id")Integer id);

    Userinfo login(@Param("username")String username,@Param("password")String password);

    int UpdateByName(Userinfo userinfo);

    int UpdateById(Userinfo userinfo);

    int Add(Userinfo userinfo);

    int DeleteById(@Param("id")Integer id);

    Userinfo getByName(@Param("username")String name);

}
